import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CustomerTableComponent } from './pages/customer-table/customer-table.component';
import { CustomerDetailComponent } from './pages/customer-detail/customer-detail.component';
import { SettlementTableComponent } from './pages/settlement-table/settlement-table.component';
import { SettlementDetailComponent } from './pages/settlement-detail/settlement-detail.component';
const routes: Routes = [
    {
        path: 'customer', component: CustomerTableComponent, data: {
            breadcrumbs: [{ title: '客户信息' }]
        },
        children: [
            {
                path: 'detail', component: CustomerDetailComponent, data: {
                    breadcrumbs: [{ title: '客户列表', path: '/customer/customer' }, { title: '新增客户' }]
                }
            },
            {
                path: 'detail/:id', component: CustomerDetailComponent, data: {
                    breadcrumbs: [{ title: '客户列表', path: '/customer/customer' }, { title: '客户详情' }]
                }
            },
        ]

    },
    {
        path: 'settlement', component: SettlementTableComponent, data: {
            breadcrumbs: [{ title: '结算设置' }]
        },
        children: [
            {
                path: 'detail', component: SettlementDetailComponent, data: {
                    breadcrumbs: [{ title: '结算设置', path: '/customer/customer' }, { title: '新增结算' }]
                }
            },
            {
                path: 'detail/:id', component: SettlementDetailComponent, data: {
                    breadcrumbs: [{ title: '结算设置', path: '/customer/customer' }, { title: '结算信息详情' }]
                }
            },
        ]

    }
];

export const declarationComponents = [
    CustomerTableComponent,
    CustomerDetailComponent,
    SettlementDetailComponent,
    SettlementTableComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class CustomerRoutingModule { }
